﻿using System;

namespace housingsafety.server.Models
{
    /// <summary>
    /// 用户角色集合
    /// </summary>
    public class UserRoleSet
    {
        /// <summary>
        /// 用户编号
        /// </summary>
        public string UserNumber { get; set; }
        /// <summary>
        /// 是否是系统管理员
        /// </summary>
        public bool SysAdmin { get; set; }

        /// <summary>
        /// 构造
        /// </summary>
        public UserRoleSet()
        {

        }

        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="userNumber">用户编号</param>
        /// <param name="sysAdmin">是否是系统管理员</param>
        public UserRoleSet(string userNumber, bool? sysAdmin)
        {
            UserNumber = userNumber;
            SysAdmin = sysAdmin.HasValue && sysAdmin.Value;
        }
    }
}